/*!
 * krajee-markdown-editor v1.0.0
 * http://plugins.krajee.com/krajee-markdown-editor
 *
 * Krajee Markdown Editor Default SCSS Style
 *
 * Author: Kartik Visweswaran
 * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com
 *
 * Licensed under the BSD 3-Clause
 * https://github.com/kartik-v/krajee-markdown-editor/blob/master/LICENSE.md
 */
//colors
$white: #fff !default;
$color_alto: #ddd !default;
$color_romance: #fefefe !default;
$color_celeste: #ccc !default;
$color_wild_sand: #f5f5f5 !default;
$color_bon_jour: #dfdfdf !default;
$black_7_5: rgba(0, 0, 0, .075) !default;
$color_cornflower_blue_60: rgba(102, 175, 233, 0.6) !default;
$color_cornflower_blue: #66afe9 !default;
$color_apple_blossom: #a94442 !default;
$color_lotus: #843534 !default;
$color_new_york_pink: #ce8483 !default;
$color_killarney: #3c763d !default;
$color_lunar_green: #2b542c !default;
$color_fern: #67b168 !default;
$color_oyster_pink: #ebccd1 !default;
$color_mountain_mist: #999 !default;
$color_fuscous_gray: #555 !default;
$color_regent_st_blue: #afd9ee !default;
$black: #000 !default;

//fonts
$font_0: Monaco !default;
$font_1: Menlo !default;
$font_2: Consolas !default;
$font_3: Courier New !default;
$font_4: monospace !default;

//urls
$url_0: url(../img/loading.gif) !default;

//@extend-elements
%set_blur {
    outline: 0;
    box-shadow: none;
    border-top-color: $color_bon_jour;
    border-bottom-color: $color_bon_jour;
}

%set_focus {
    outline: 0;
    box-shadow: inset 0 1px 1px $black_7_5, 0 0 8px $color_cornflower_blue_60;
    border-color: $color_cornflower_blue;
}

%set_md_cell {
    padding: 0;
    margin: 0;
    border: 0;
    transition: width .1s ease;
}

.md-container {
    background: $white;
    transition: width .1s ease;
}

.md-input-cell {
    @extend %set_md_cell;
}

.md-preview-cell {
    @extend %set_md_cell;
}

.md-editor {
    display: block;
    border: 1px solid $color_alto;
    border-radius: 4px;
    .md-header {
        background: $color_romance;
        padding: 0 2px;
        border-radius: 4px 4px 0 0;
    }
    .md-footer {
        background: $color_romance;
        padding: 0 2px;
        border-radius: 0 0 4px 4px;
    }
    .md-preview {
        background: $white;
        &:focus {
            @extend %set_blur;
        }
    }
    .md-btn-preview {
        .md-editor-label {
            display: none;
        }
        &.md-preview-mode {
            .md-preview-label {
                display: none;
            }
            .md-editor-label {
                display: inline-block;
            }
        }
        .md-preview-label {
            display: inline-block;
        }
    }
    &:focus {
        @extend %set_focus;
    }
    &.active {
        @extend %set_focus;
    }
    .md-input:focus {
        @extend %set_blur;
    }
    > .md-preview {
        position: relative;
        background: $white;
        border-top: 1px dashed $color_alto;
        border-bottom: 1px dashed $color_alto;
        min-height: 10px;
        overflow: auto;
        padding: 8px;
    }
}

.md-input {
    resize: none;
    font-family: $font_0, $font_1, $font_2, $font_3, $font_4;
    font-size: 14px;
    display: block;
    line-height: 20px;
    width: 100%;
    border: 0;
    border-top: 1px solid $color_celeste;
    border-bottom: 1px solid $color_celeste;
    border-radius: 0;
    background: $color_wild_sand;
    box-shadow: none;
    margin: 0;
    padding: 8px;
}

.md-btn-group {
    margin: 1px;
    padding: 0;
    .btn {
        padding: 2px 5px;
    }
}

.md-btn-heading1 {
    font-size: 36px;
}

.md-btn-heading2 {
    font-size: 30px;
}

.md-btn-heading3 {
    font-size: 24px;
}

.md-btn-heading4 {
    font-size: 20px;
}

.md-btn-heading5 {
    font-size: 14px;
}

.md-btn-heading6 {
    font-size: 12px;
}

.md-preview {
    img {
        max-width: 35%;
    }
    th[align="right"] {
        text-align: right !important;
    }
    th[align="center"] {
        text-align: center !important;
    }
    .footnote-backref {
        text-decoration: none;
    }
}

.md-fullscreen-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1100;
    .md-max-icon {
        display: none;
    }
    .md-min-icon {
        display: inline;
    }
    .md-editor {
        padding: 0;
        border: none;
        box-shadow: none;
        border-radius: 0;
        &:focus {
            box-shadow: none;
        }
    }
    .md-preview:focus {
        box-shadow: none;
    }
}

.md-min-icon {
    display: none;
}

.md-max-icon {
    display: inline;
}

.md-preview-message {
    position: absolute;
    height: 80px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
}

.md-alert {
    margin: 5px;
    text-align: center;
}

.md-zero-pad {
    padding: 0;
    border-radius: 0;
    .alert {
        border-color: $color_oyster_pink;
        border-radius: 4px;
    }
}

.md-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    background: $url_0 no-repeat center bottom;
    cursor: wait;
    opacity: 0.4;
    height: 50px;
    text-align: center;
    font-size: 18px;
}

.md-hint {
    font-size: .85em;
    color: $color_mountain_mist;
    &:hover {
        color: $color_fuscous_gray;
    }
}

.md-codeblock {
    padding: 5px 8px;
    background-color: $color_wild_sand;
    border: 1px solid $color_alto;
    border-radius: 0;
}

.md-hint-access-keys {
    height: 257px;
    padding-right: 5px;
    overflow-x: hidden;
    overflow-y: scroll;
    ul {
        padding-left: 0;
        list-style: none;
    }
    li {
        transition: all .1s ease;
        float: left;
        width: 20%;
        height: 100px;
        padding: 10px;
        text-align: center;
        background-color: $color_wild_sand;
        border: 1px solid $white;
        &:hover {
            background-color: $color_regent_st_blue;
        }
    }
    .btn {
        padding: 3px 6px;
    }
}

.md-emoji {
    line-height: 1.4;
    font-size: 24px;
}

.md-emojies-list {
    height: 250px;
    width: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    .md-btn-emoji {
        background: none;
        text-decoration: none;
        display: block;
        margin: 0;
        padding: 2px;
        width: 100%;
        height: 100%;
    }
    li:not(.md-emoji-search) {
        display: inline-block;
        padding: 0;
        float: left;
        width: 40px;
        height: 40px;
        text-align: center;
        background-color: $color_wild_sand;
        border: 1px solid $white;
        &:hover {
            background-color: $color_regent_st_blue;
        }
    }
}

.md-btn-emoji {
    vertical-align: middle !important;
    span {
        vertical-align: middle !important;
    }
}

.md-emoji-search {
    padding: 2px 6px 6px;
    background: none;
    position: relative;
    &:hover {
        background: none;
    }
    .md-close {
        position: absolute;
        top: 7px;
        right: 15px;
        font-size: 20px;
        font-weight: 700;
        line-height: 1;
        color: $black;
        text-shadow: 0 1px 0 $white;
        filter: alpha(opacity=20);
        opacity: .2;
        &:hover {
            cursor: pointer;
            filter: alpha(opacity=50);
            opacity: .5;
        }
    }
}

.emoji {
    height: 1.2em;
}

.md-input-preview {
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    .md-preview {
        position: relative;
        border-top: 1px solid $color_celeste;
        border-bottom: 1px solid $color_celeste;
        border-right: 0;
        padding: 8px;
        overflow-y: auto;
    }
}

.md-preview-mode-title {
    font-size: 18px;
    font-weight: bold;
    color: $color_celeste;
    padding: 4px 8px 0;
    display: none;
}

.md-preview-mode {
    .md-preview-cell {
        width: 100%;
    }
    .md-input-cell {
        width: 0;
    }
    .md-input {
        display: none;
    }
    .md-preview {
        display: block;
    }
}

.md-editor-mode {
    .md-input-cell {
        width: 100%;
    }
    .md-preview-cell {
        width: 0;
    }
    .md-preview {
        display: none;
    }
    .md-input {
        display: block;
    }
}

.md-only-preview {
    .md-preview-mode-title {
        display: block;
    }
    .md-btn-group:not(.md-always-visible) {
        display: none;
    }
}

.md-dialog-title {
    margin-top: 10px;
}

.has-error .md-editor {
    border-color: $color_apple_blossom;
    box-shadow: inset 0 1px 1px $black_7_5;
    &:focus {
        border-color: $color_lotus;
        box-shadow: inset 0 1px 1px $black_7_5, 0 0 6px $color_new_york_pink;
    }
    &.active {
        border-color: $color_lotus;
        box-shadow: inset 0 1px 1px $black_7_5, 0 0 6px $color_new_york_pink;
    }
}

.has-success .md-editor {
    border-color: $color_killarney;
    box-shadow: inset 0 1px 1px $black_7_5;
    &:focus {
        border-color: $color_lunar_green;
        box-shadow: inset 0 1px 1px $black_7_5, 0 0 6px $color_fern;
    }
    .active {
        border-color: $color_lunar_green;
        box-shadow: inset 0 1px 1px $black_7_5, 0 0 6px $color_fern;
    }
}

.md-dialog .md-alert {
    margin: 0;
}

.md-dialog-content > ul {
    padding-left: 15px;
}

.md-split-mode .md-input-cell {
    width: 50%;
}